﻿using DevExpress.Xpf.Charts;
using System.Windows.Media;

namespace TeBigCommonUI.Items
{
    public class ChartPalette : CustomPalette
    {
        private static Color[] my_colors = new Color[]
        {
            Color.FromArgb(0xdf, 41, 127, 213),     //#df297fd5
            Color.FromArgb(0xdf, 16, 207, 155),     //#df10cf9b
            Color.FromArgb(0xdf, 165, 194, 73),     //#dfa5c249
            Color.FromArgb(0xdf, 28, 173, 228),     //#df1cade4
            Color.FromArgb(0xdf, 74, 102, 172),     //#df4a68ac
            Color.FromArgb(0xdf, 98, 157, 209),     //#df629dd1
            Color.FromArgb(0xdf, 127, 143, 169),    //#df7f8fa9
            Color.FromArgb(0xdf, 90, 162, 174),     //#df5aa2ae
            Color.FromArgb(0xdf, 157, 144, 160)     //#df1cade4
        };

        //static Color[] my_colors = new Color[]
        //{
        //    Color.FromArgb(0xbf, 94, 204, 243),         //#bf5eccf3
        //    Color.FromArgb(0xbf, 255, 202, 8),          //#bfffca08
        //    Color.FromArgb(0xbf, 0xf7, 0x2b, 0x3d),     //#bff72b3d
        //    Color.FromArgb(0xbf, 36, 168, 17),          //#bf24a811
        //    Color.FromArgb(0xbf, 180, 22, 132),         //#bfb41784
        //    Color.FromArgb(0xbf, 36, 168, 17),          //#bf24a811
        //    Color.FromArgb(0xbf, 0xf7, 0x2b, 0x3d),     //#bff72b3d
        //    Color.FromArgb(0xbf, 255, 202, 8),          //#bfffca08
        //};

        public ChartPalette()
        {

        }

        public static ChartPalette DefaultPalette()
        {
            return new ChartPalette(my_colors);
        }

        private ChartPalette(Color[] colors)
        {
            this.Colors.Clear();

            foreach (var item in my_colors)
            {
                this.Colors.Add(item);
            }
        }
    }

    public class MyPalette2 : CustomPalette
    {
        private static Color[] my_colors = new Color[]
        {
            Color.FromArgb(0x7f, 41, 127, 213),     //#af297fd5
            Color.FromArgb(0x7f, 165, 194, 73),     //#afa5c249
            Color.FromArgb(0x7f, 28, 173, 228),     //#af1cade4
            Color.FromArgb(0x7f, 74, 102, 172),     //#af4a68ac
            Color.FromArgb(0x7f, 98, 157, 209),     //#af629dd1
            Color.FromArgb(0x7f, 127, 143, 169),    //#af7f8fa9
            Color.FromArgb(0x7f, 90, 162, 174),     //#af5aa2ae
            Color.FromArgb(0x7f, 157, 144, 160)     //#af1cade4
        };

        public MyPalette2()
        {
            this.Colors.Clear();

            foreach (var item in my_colors)
            {
                this.Colors.Add(item);
            }
        }
    }
}